import request from '../utils/request';

// export const fetchData = query => {
//     return request({
//         url: 'goods/getAllGoods',
//         method: 'get',
//         params: query
//     });
// };

//发送获取服务一级分类请求
export const getServerType = query => {
    return request({
        url: 'carBeautyChange/getServerType',
        method: 'get',
        params: query
    });
};

//发送获取所有服务（分页）请求
export const getServerShop = query => {
    return request({
        url: 'carBeautyChange/getAllServer',
        method: 'post',
        params: query
    });
};

//发送修改服务请求
export const updateServerShop = query => {
    return request({
        url: 'carBeautyChange/updateServiceShop',
        method: 'post',
        params: query
    });
};

//发送新增分类请求
export const addServerType = query => {
    return request({
        url: 'carBeautyChange/addServerType',
        method: 'post',
        params: query
    });
};

//删除分类
export const deleteServerType = query => {
    return request({
        url: 'carBeautyChange/deleteServerType',
        method: 'post',
        params: query
    });
};

//修改分类
export const updateServerType = query => {
    return request({
        url: 'carBeautyChange/updateServiceType',
        method: 'post',
        params: query
    });
};

//删除服务详情
export const deleteServerShop = query => {
    return request({
        url: 'carBeautyChange/deleteServiceShop',
        method: 'post',
        params: query,
        traditional:true,
    });
};